3.2.68 \(\int \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx\) [168]
Optimal. Leaf size=131 \[ \frac {\sqrt {a} (4 A+3 B) \text {ArcSin}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{4 d}+\frac {a (4 A+3 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {a B \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}} \]
[Out]
1/4*(4*A+3*B)*arcsin(sin(d*x+c)*a^(1/2)/(a+a*cos(d*x+c))^(1/2))*a^(1/2)/d+1/2*a*B*cos(d*x+c)^(3/2)*sin(d*x+c)/
d/(a+a*cos(d*x+c))^(1/2)+1/4*a*(4*A+3*B)*sin(d*x+c)*cos(d*x+c)^(1/2)/d/(a+a*cos(d*x+c))^(1/2)
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {3060, 2849,
2853, 222} \begin {gather*} \frac {\sqrt {a} (4 A+3 B) \text {ArcSin}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{4 d}+\frac {a (4 A+3 B) \sin (c+d x) \sqrt {\cos (c+d x)}}{4 d \sqrt {a \cos (c+d x)+a}}+\frac {a B \sin (c+d x) \cos ^{\frac {3}{2}}(c+d x)}{2 d \sqrt {a \cos (c+d x)+a}} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[Sqrt[Cos[c + d*x]]*Sqrt[a + a*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]
[Out]
(Sqrt[a]*(4*A + 3*B)*ArcSin[(Sqrt[a]*Sin[c + d*x])/Sqrt[a + a*Cos[c + d*x]]])/(4*d) + (a*(4*A + 3*B)*Sqrt[Cos[
c + d*x]]*Sin[c + d*x])/(4*d*Sqrt[a + a*Cos[c + d*x]]) + (a*B*Cos[c + d*x]^(3/2)*Sin[c + d*x])/(2*d*Sqrt[a + a
*Cos[c + d*x]])
Rule 222
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]
Rule 2849
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp
[-2*b*Cos[e + f*x]*((c + d*Sin[e + f*x])^n/(f*(2*n + 1)*Sqrt[a + b*Sin[e + f*x]])), x] + Dist[2*n*((b*c + a*d)
/(b*(2*n + 1))), Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f}
, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[n, 0] && IntegerQ[2*n]
Rule 2853
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[-2/f, Su
bst[Int[1/Sqrt[1 - x^2/a], x], x, b*(Cos[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, d, e, f}, x]
&& EqQ[a^2 - b^2, 0] && EqQ[d, a/b]
Rule 3060
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.
) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[-2*b*B*Cos[e + f*x]*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(2*n + 3)*Sqrt
[a + b*Sin[e + f*x]])), x] + Dist[(A*b*d*(2*n + 3) - B*(b*c - 2*a*d*(n + 1)))/(b*d*(2*n + 3)), Int[Sqrt[a + b*
Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] &&
EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && !LtQ[n, -1]
Rubi steps
\begin {align*} \int \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)} (A+B \cos (c+d x)) \, dx &=\frac {a B \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}+\frac {1}{4} (4 A+3 B) \int \sqrt {\cos (c+d x)} \sqrt {a+a \cos (c+d x)} \, dx\\ &=\frac {a (4 A+3 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {a B \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}+\frac {1}{8} (4 A+3 B) \int \frac {\sqrt {a+a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx\\ &=\frac {a (4 A+3 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {a B \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}-\frac {(4 A+3 B) \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a}}} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{4 d}\\ &=\frac {\sqrt {a} (4 A+3 B) \sin ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{4 d}+\frac {a (4 A+3 B) \sqrt {\cos (c+d x)} \sin (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {a B \cos ^{\frac {3}{2}}(c+d x) \sin (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.32, size = 100, normalized size = 0.76 \begin {gather*} \frac {\sqrt {a (1+\cos (c+d x))} \sec \left (\frac {1}{2} (c+d x)\right ) \left (\sqrt {2} (4 A+3 B) \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right )+2 \sqrt {\cos (c+d x)} (4 A+3 B+2 B \cos (c+d x)) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{8 d} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[Sqrt[Cos[c + d*x]]*Sqrt[a + a*Cos[c + d*x]]*(A + B*Cos[c + d*x]),x]
[Out]
(Sqrt[a*(1 + Cos[c + d*x])]*Sec[(c + d*x)/2]*(Sqrt[2]*(4*A + 3*B)*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]] + 2*Sqrt[Co
s[c + d*x]]*(4*A + 3*B + 2*B*Cos[c + d*x])*Sin[(c + d*x)/2]))/(8*d)
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(283\) vs.
\(2(111)=222\).
time = 0.32, size = 284, normalized size = 2.17
| | |
method |
result |
size |
| | |
default |
\(\frac {\left (-1+\cos \left (d x +c \right )\right )^{2} \left (4 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \cos \left (d x +c \right ) \sin \left (d x +c \right )+4 A \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )+2 B \sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )\right )+3 B \sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \cos \left (d x +c \right )+4 A \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}{\cos \left (d x +c \right )}\right ) \cos \left (d x +c \right )+3 B \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}{\cos \left (d x +c \right )}\right ) \cos \left (d x +c \right )\right ) \left (\sqrt {\cos }\left (d x +c \right )\right ) \sqrt {a \left (1+\cos \left (d x +c \right )\right )}}{4 d \sin \left (d x +c \right )^{4} \left (\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {3}{2}}}\) |
\(284\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x,method=_RETURNVERBOSE)
[Out]
1/4/d*(-1+cos(d*x+c))^2*(4*A*(cos(d*x+c)/(1+cos(d*x+c)))^(3/2)*cos(d*x+c)*sin(d*x+c)+4*A*(cos(d*x+c)/(1+cos(d*
x+c)))^(3/2)*sin(d*x+c)+2*B*sin(d*x+c)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*cos(d*x+c)^2+3*B*sin(d*x+c)*(cos(d*x+
c)/(1+cos(d*x+c)))^(1/2)*cos(d*x+c)+4*A*arctan(sin(d*x+c)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/cos(d*x+c))*cos(d*
x+c)+3*B*arctan(sin(d*x+c)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/cos(d*x+c))*cos(d*x+c))*cos(d*x+c)^(1/2)*(a*(1+co
s(d*x+c)))^(1/2)/sin(d*x+c)^4/(cos(d*x+c)/(1+cos(d*x+c)))^(3/2)
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1851 vs.
\(2 (111) = 222\).
time = 0.71, size = 1851, normalized size = 14.13 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="maxima")
[Out]
1/16*(4*(2*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x
+ 2*c), cos(2*d*x + 2*c) + 1))*sin(d*x + c) - (cos(d*x + c) - 1)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x
+ 2*c) + 1)))*sqrt(a) + sqrt(a)*(arctan2(-(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(
1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(d*x + c) - cos(d*x + c)*sin(1/2*arctan2(sin
(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/
4)*(cos(d*x + c)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c)*sin(1/2*arctan2(sin(2
*d*x + 2*c), cos(2*d*x + 2*c) + 1))) + 1) - arctan2(-(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x +
2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(d*x + c) - cos(d*x + c)*sin(1/2*
arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*
c) + 1)^(1/4)*(cos(d*x + c)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c)*sin(1/2*ar
ctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))) - 1) - arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*co
s(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(
2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + 1) +
arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2*d*x +
2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2
*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - 1)))*A + (2*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*c
os(2*d*x + 2*c) + 1)^(1/4)*((cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))*sin(2*d*x + 2*c) - (cos(2*d*
x + 2*c) - 2)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) + sin(2*d*x + 2*c))*cos(1/2*arctan2(sin(2*d
*x + 2*c), cos(2*d*x + 2*c) + 1)) + ((cos(2*d*x + 2*c) - 2)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)
)) + sin(2*d*x + 2*c)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) - cos(2*d*x + 2*c) + 2)*sin(1/2*arc
tan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))*sqrt(a) + 3*sqrt(a)*(arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x +
2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))*sin(1/2*arctan2(s
in(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*arc
tan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)
^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x +
2*c))) + sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x
+ 2*c)))) + 1) - arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*ar
ctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - cos(1/2*
arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))), (cos(2
*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*(cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*
x + 2*c) + 1))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) + sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*
d*x + 2*c) + 1))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c)))) - 1) - arctan2((cos(2*d*x + 2*c)^2 + si
n(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (co
s(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*
d*x + 2*c) + 1)) + 1) + arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1
/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x +
2*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - 1)))*B)/d
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 117, normalized size = 0.89 \begin {gather*} \frac {{\left (2 \, B \cos \left (d x + c\right ) + 4 \, A + 3 \, B\right )} \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - {\left ({\left (4 \, A + 3 \, B\right )} \cos \left (d x + c\right ) + 4 \, A + 3 \, B\right )} \sqrt {a} \arctan \left (\frac {\sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a} \sin \left (d x + c\right )}\right )}{4 \, {\left (d \cos \left (d x + c\right ) + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="fricas")
[Out]
1/4*((2*B*cos(d*x + c) + 4*A + 3*B)*sqrt(a*cos(d*x + c) + a)*sqrt(cos(d*x + c))*sin(d*x + c) - ((4*A + 3*B)*co
s(d*x + c) + 4*A + 3*B)*sqrt(a)*arctan(sqrt(a*cos(d*x + c) + a)*sqrt(cos(d*x + c))/(sqrt(a)*sin(d*x + c))))/(d
*cos(d*x + c) + d)
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \left (A + B \cos {\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)**(1/2)*(a+a*cos(d*x+c))**(1/2)*(A+B*cos(d*x+c)),x)
[Out]
Integral(sqrt(a*(cos(c + d*x) + 1))*(A + B*cos(c + d*x))*sqrt(cos(c + d*x)), x)
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(cos(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2)*(A+B*cos(d*x+c)),x, algorithm="giac")
[Out]
integrate((B*cos(d*x + c) + A)*sqrt(a*cos(d*x + c) + a)*sqrt(cos(d*x + c)), x)
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {\cos \left (c+d\,x\right )}\,\left (A+B\,\cos \left (c+d\,x\right )\right )\,\sqrt {a+a\,\cos \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(cos(c + d*x)^(1/2)*(A + B*cos(c + d*x))*(a + a*cos(c + d*x))^(1/2),x)
[Out]
int(cos(c + d*x)^(1/2)*(A + B*cos(c + d*x))*(a + a*cos(c + d*x))^(1/2), x)
________________________________________________________________________________________